package com.bahiaapk;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

/**
 * @author Igor Faria
 *
 */
public class CastActivity extends Activity {
	
	private Button professionalBTN;
	private Button juvenilBTN;
	private Button juniorBTN;
	private TextView professionalTV;
	private TextView juvenilTV;
	private TextView juniorTV;

	
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.cast);      
        
        professionalBTN = (Button)findViewById(R.id.professionalBTN);
        juvenilBTN = (Button)findViewById(R.id.juvenilBTN);
        juniorBTN = (Button)findViewById(R.id.juniorBTN);
        professionalTV = (TextView)findViewById(R.id.professionalTV);
        juvenilTV = (TextView)findViewById(R.id.juvenilTV);
        juniorTV = (TextView)findViewById(R.id.juniorTV);
    }
    
    

    public void changeNews(View view){
		
    	professionalBTN.setBackgroundResource(Color.TRANSPARENT);
    	professionalTV.setTextColor(Color.BLACK);
		
		juvenilBTN.setBackgroundResource(Color.TRANSPARENT);
		juvenilTV.setTextColor(Color.BLACK);
		
		juniorBTN.setBackgroundResource(Color.TRANSPARENT);
		juniorTV.setTextColor(Color.BLACK);
		
		switch (view.getId()) {
            case R.id.professionalBTN: {
            	professionalBTN.setBackgroundResource(R.drawable.img_btn_news2);
        		professionalTV.setTextColor(Color.WHITE);
                break;
            }
                
            case R.id.juvenilBTN: {
            	juvenilBTN.setBackgroundResource(R.drawable.img_btn_news2);
            	juvenilTV.setTextColor(Color.WHITE);
            
                break;
            }
            
            case R.id.juniorBTN: {
            	juniorBTN.setBackgroundResource(R.drawable.img_btn_news2);
            	juniorTV.setTextColor(Color.WHITE);
            	
                break;
            }
            
           
		}
	}
}